package com.quyunshuo.module.home.fragment

import com.quyunshuo.androidbaseframemvvm.network.bean.ArticleListRes2

fun Result<ArticleListRes2>.reduce(isSearchMode: Boolean = false): HomeState {
    return when (this) {
        is Result.Success -> HomeState.ResultAllPersona(data)
        is Result.Error -> HomeState.Exception(exception)
        is Result.Loading -> HomeState.Loading
    }
}